From: Wei Liu Date: Fri, 20 Mar 2015 16:19:11 +0000 (+0000) Subject: libxl: use LIBXL_TOOLSTACK_DOMID X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3533 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=585454fc54c9a8a2b6670f78fad21c0d932bcdef;p=xen.git libxl: use LIBXL_TOOLSTACK_DOMID The function in question is libxl__spawn_local_dm. We should use LIBXL_TOOLSTACK_DOMID when constructing xenstore path. Currently LIBXL_TOOLSTACK_DOMID is 0, so this patch introduces no functional change. Use helper function to generate xenstore path. Signed-off-by: Wei Liu Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 5b8c3c0673..af8b8d33da 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1390,7 +1390,7 @@ void libxl__spawn_local_dm(libxl__egc *egc, libxl__dm_spawn_state *dmss) free(path); } - path = libxl__sprintf(gc, "/local/domain/0/device-model/%d", domid); + path = libxl__device_model_xs_path(gc, LIBXL_TOOLSTACK_DOMID, domid, ""); xs_mkdir(ctx->xsh, XBT_NULL, path); if (b_info->type == LIBXL_DOMAIN_TYPE_HVM && @@ -1440,6 +1440,8 @@ retry_transaction: spawn->what = GCSPRINTF("domain %d device model", domid); spawn->xspath = GCSPRINTF("/local/domain/0/device-model/%d/state", domid); + spawn->xspath = libxl__device_model_xs_path(gc, LIBXL_TOOLSTACK_DOMID, + domid, "/state"); spawn->timeout_ms = LIBXL_DEVICE_MODEL_START_TIMEOUT * 1000; spawn->pidpath = GCSPRINTF("%s/image/device-model-pid", dom_path); spawn->midproc_cb = libxl__spawn_record_pid;